import HelloWorld from '@/components/HelloWorld.vue'
import { createRouter, createWebHashHistory } from 'vue-router'
import Center from '../views/Center.vue'
import Login from '../views/Login.vue'

const routes = [
  {
    path: '/',
    redirect: {
      name: 'center'
    }
  },
  {
    path: '/center',
    name: 'center',
    component: Center,
    meta: {
      title: '用户信息'
    }
  },
  {
    path: '/hello',
    name: 'hello',
    component: HelloWorld,
    meta: {
      title: '问好页面'
    }
  },
   {
    path: '/login',
    name: 'login',
    component: Login,
    meta: {
      title: '登录'
    }
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
